package com.dongss.study.service;

import com.dongss.study.dao.RoleDAO;
import com.dongss.study.domain.Role;
import com.dongss.study.domain.User;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * Created by dongshuanshuan on 17-7-30.
 */
@Service
@Transactional
public class RoleService {

    @Resource
    RoleDAO roleDAO;

    public void create(Role role){
        roleDAO.save(role);
    }

    public void update(Role role){
        roleDAO.update(role);
    }

    public void delete(Role role){
        roleDAO.delete(role);
    }

    public Role find(Integer id){
        return roleDAO.get(id);
    }
}
